export const BUCKETS_UPDATE = 'BUCKETS_UPDATE';
export const BUCKETS_UPDATE_START = 'BUCKETS_UPDATE_START';
export const SELECT_BUCKET = 'SELECT_BUCKET';

export function updateBuckets(buckets) {
  return {
    type: BUCKETS_UPDATE,
    payload: {
      buckets: [...buckets]
    }
  };
}

export function startUpdateBuckets() {
  return {
    type: BUCKETS_UPDATE_START
  };
}

export function selectBucket(bucket) {
  return {
    type: SELECT_BUCKET,
    payload: {
      bucket
    }
  };
}
